<jsp:include page="template_header.jsp" />

<div class="span9"> <!-- /write your content -->

				<div class="page-header">
					<h3>Please change password below</h3>
				</div>
<jsp:include page="error-list.jsp" />
	<form id="changePasswordForm" class="form-horizonal"  method="post" action="changePassword.do">
		<div class="control-group">
			<input type="hidden" name="userId" value="${user.id}"/>
			<div class="controls">
				<label class="control-label" for="">Old Password: </label>
				<input type="password" name="oldPassword" value="" id="pass"/>
				</div>
				<div class="controls">
				<label class="control-label" for="">New Password: </label>
				<input type="password" name="newPassword" value="" id="newpass"/>
				</div>
				<div class="controls">
				<label class="control-label" for="">Confirm Password: </label>
				<input type="password" name="confirmPassword" value="" id="pass_verify"/>
				</div>
				<button type="submit" onclick="hashPasswords()" class="btn">Change Password</button>
				<script src="js/md5.js"></script>
				<script>
					function hashPasswords()
					{
						var password = $('#pass_verify').val();
						if(password!="")
						{
							$('#pass_verify').val(md5(password));
						}
						password = $('#pass').val();
						if(password!="")
						{
							$('#pass').val(md5(password));
						}
						password = $('#newpass').val();
						if(password!="")
						{
							$('#newpass').val(md5(password));
						}
					}
				</script>
		</div>
	</form>

</div>

<jsp:include page="template_tail.jsp" />
